const String sl_container_RACCommand_h = '''
#import <Foundation/Foundation.h>
#import <ReactiveObjC/ReactiveObjC.h>
[IN_IMPORT]
[DOC_CHECK]#import "[DOC_MANAGER].h"

/*
typedef NS_ENUM(NSUInteger, [IN_NAME]Code) {
    [IN_NAME]Code_NO = 0
};
*/


NS_ASSUME_NONNULL_BEGIN

/// [IN_DESC]
/// @date [DATE]
/// @author generate
@interface [IN_NAME] :NSObject
/// {@"code":@(0),@"msg":@""}
@property (nonatomic, strong) RACSubject *messageSubject;
@property (nonatomic, strong) RACCommand *requestCommand;
[IN_PROPERTY]
[DOC_CHECK]@property (nonatomic, strong) [DOC_MANAGER] *[DOC_MANAGER_NAME];
[DOC_PROPERTIES]
@end

NS_ASSUME_NONNULL_END
''';

const String sl_container_RACCommand_m = '''
#import "[IN_NAME].h"

@interface [IN_NAME]()
@end

@implementation [IN_NAME]
#pragma mark - Init
-(instancetype)init{
    if (self = [super init]) {
        NSLog(@"%s",__func__);
[VM_IM_PROPERTY]
        [self racInit];
    }
    return self;
}

-(void)dealloc {
    NSLog(@"%s",__func__);
    [self.requestCommand rac_deallocDisposable];
    [self.messageSubject rac_deallocDisposable];
[VM_IM_PROPERTY_DIS]
[DOC_MTD_DIS]
}

- (void)racInit {
    [self seg_requestCommand];
[VM_IM_CMD_USE]
[DOC_MTD_INVOKE]
}

#pragma mark - Publish Methods

#pragma mark - Private Methods
/// show message
-(void)seg_showMessage:(NSString*)msg code:(NSInteger)code{
    [self.messageSubject sendNext:@{@"code":@(code),@"msg":msg}];
}

-(void)seg_requestCommand{
    //@weakify(self);
    _requestCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id  _Nullable input) {
        return [RACSignal createSignal:^RACDisposable * _Nullable(id<RACSubscriber>  _Nonnull subscriber) {
            //@strongify(self);
            
            // Code here...
            // [subscriber sendNext:nil];
            // [subscriber sendCompleted];

            // NSError *error = [NSError errorWithDomain:NSCocoaErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:@"error!"}];
            // [subscriber sendError:error];            
            return [RACDisposable disposableWithBlock:^{
            }];
        }];
    }];
}
[VM_IM_CMD]
[DOC_MTD_MTD]

#pragma mark - Getter
-(RACSubject *)messageSubject{
    if (!_messageSubject) {
        _messageSubject = [RACSubject subject];
    }
    return _messageSubject;
}

[DOC_CHECK]-([DOC_MANAGER] *)[DOC_MANAGER_NAME]{
[DOC_CHECK]    if (!_[DOC_MANAGER_NAME]) {
[DOC_CHECK]        _[DOC_MANAGER_NAME] = [[[DOC_MANAGER] alloc]init];
[DOC_CHECK]    }
[DOC_CHECK]    return _[DOC_MANAGER_NAME];
[DOC_CHECK]}
#pragma mark - Stter
@end
''';

const String sl_container_UITableViewCell_h = '''
#import <UIKit/UIKit.h>
[IN_IMPORT]

/// [IN_DESC]
/// @date [DATE]
/// @author generate
@interface [IN_NAME] : [IN_TYPE]
@property (strong, nonatomic) NSIndexPath *indexPath;
+(NSString*)reuseIdentifier;
+(instancetype)cellWithTableView:(UITableView*)tableView indexPath:(NSIndexPath*)indexPath;

[IN_PROPERTY]
[V_VM_CHECK]@property(nonatomic,strong) [V_VM_TYPE]* viewModel;
@end
''';
const String sl_container_UITableViewCell_m = '''
#if __has_include(<SEGMasonry/SEGMasonry.h>)
#import <SEGMasonry/SEGMasonry.h>
#else
#import "SEGMasonry.h"
#endif

#if __has_include(<SEGTool/UIColor+SEGCategory.h>)
#import <SEGTool/UIColor+SEGCategory.h>
#else
#import "UIColor+SEGCategory.h"
#endif

#import "[IN_NAME].h"

@interface [IN_NAME] ()[V_DELEGATE_NAME]
@end

@implementation [IN_NAME]
#pragma mark - Life Cycle
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self segInitViews];
    }
    return self;
}

-(void)dealloc {
    NSLog(@"%s dealloc",__FUNCTION__);
}

#pragma mark - Layout
- (void)updateConstraints {
    [super updateConstraints];
}

#pragma mark - Public Methods

+(instancetype)cellWithTableView:(UITableView*)tableView indexPath:(NSIndexPath*)indexPath{
    [IN_NAME] *cell = [tableView dequeueReusableCellWithIdentifier:[self reuseIdentifier]];
    if (!cell) {
        cell = [[self alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:[self reuseIdentifier]];
    }
    cell.indexPath = indexPath;
    return cell;
}

#pragma mark - Private Methods

+(NSString*)reuseIdentifier{
    return NSStringFromClass([self class]);
}

-(void)segInitViews{
    self.contentView.backgroundColor = [UIColor whiteColor];
    
    // self.contentView addSubview
[V_ADD_SUB]

    // masonry...
[V_LAYOUT]
}

// tell UIKit that you are using AutoLayout
+ (BOOL)requiresConstraintBasedLayout {
    return YES;
}

[V_VM_CHECK]#pragma mark - RAC Data Binding
[V_VM_CHECK]- (void)bindViewModel {
[V_VM_CHECK]    //@weakify(self);
[V_VM_CHECK]
[V_VM_CHECK]    // {@"code":@(0),@"msg":@""}
[V_VM_CHECK]    [self.viewModel.messageSubject subscribeNext:^(NSDictionary*  _Nullable x) {
[V_VM_CHECK]        //@strongify(self);
[V_VM_CHECK]        NSInteger code = [[x valueForKey:@"code"] integerValue];
[V_VM_CHECK]        NSString *msg = [x valueForKey:@"msg"];
[V_VM_CHECK]
[V_VM_CHECK]        switch(code) {
[V_VM_CHECK]            case 0: 
[V_VM_CHECK]            NSLog(@"%@",msg);
[V_VM_CHECK]            break;
[V_VM_CHECK]            default:
[V_VM_CHECK]                break;
[V_VM_CHECK]        }
[V_VM_CHECK]    }];
[V_VM_CHECK]
[V_VM_CHECK]    [[[self.viewModel.requestCommand executionSignals] switchToLatest] subscribeNext:^(NSNumber*  _Nullable x) {
[V_VM_CHECK]        //@strongify(self);
[V_VM_CHECK]    }];
[V_VM_CHECK]
[V_VM_CHECK]    [self.viewModel.requestCommand.errors subscribeNext:^(NSError * _Nullable x) {
[V_VM_CHECK]        //@strongify(self);
[V_VM_CHECK]    }];
[V_VM_CHECK]
[V_VM_CHECK]    // [self.viewModel.requestCommand execute:nil];
[V_VM_CHECK]
[V_VM_CHECK][V_VM_BIND]
[V_VM_CHECK]}

#pragma mark - getter
[V_PROPERTY_GET]
#pragma mark setter
[V_VM_CHECK]-(void)setViewModel:([V_VM_TYPE] *)viewModel{
[V_VM_CHECK]    _viewModel = viewModel;
[V_VM_CHECK]    if (!viewModel)  return;
[V_VM_CHECK]    [self bindViewModel];
[V_VM_CHECK]}
@end
''';

const String sl_container_UIView_h = '''
#import <UIKit/UIKit.h>
[IN_IMPORT]

/// [IN_DESC]
/// @date [DATE]
/// @author generate
@interface [IN_NAME] : [IN_TYPE]
[IN_PROPERTY]

[V_VM_CHECK]@property (nonatomic, strong) [V_VM_TYPE]* viewModel;
[V_VM_CHECK]- (instancetype)initWithViewModel:([V_VM_TYPE]*)viewModel;
@end
''';
const String sl_container_UIView_m = '''
#if __has_include(<SEGMasonry/SEGMasonry.h>)
#import <SEGMasonry/SEGMasonry.h>
#else
#import "SEGMasonry.h"
#endif

#if __has_include(<SEGTool/UIColor+SEGCategory.h>)
#import <SEGTool/UIColor+SEGCategory.h>
#else
#import "UIColor+SEGCategory.h"
#endif

#import "[IN_NAME].h"

@interface [IN_NAME]()[V_DELEGATE_NAME]
@end

@implementation [IN_NAME]

#pragma mark - life cycle
- (instancetype)init {
    if (self == [super init]) {
        [self segInitViews];
[V_VM_CHECK]        [self bindViewModel];
        [self updateConstraints];
    }
    return self;
}

[V_VM_CHECK]- (instancetype)initWithViewModel:([V_VM_TYPE]*)viewModel{
[V_VM_CHECK]    if (self == [super init]) {
[V_VM_CHECK]        _viewModel = viewModel;
[V_VM_CHECK]        [self segInitViews];
[V_VM_CHECK]        [self updateConstraints];
[V_VM_CHECK]        [self bindViewModel];
[V_VM_CHECK]    }
[V_VM_CHECK]    return self;
[V_VM_CHECK]}

-(void)dealloc {
    NSLog(@"%s dealloc",__FUNCTION__);
}

#pragma mark - Init Views
-(void)segInitViews{
    self.backgroundColor = [UIColor whiteColor];
[V_ADD_SUB]
}

#pragma mark - Layout
- (void)updateConstraints {
    [super updateConstraints];
[V_LAYOUT]
}

[V_TABLE_CELL_USE]
#pragma mark - Public Methods
#pragma mark - Private Methods
[V_VM_CHECK]#pragma mark - RAC Data Binding
[V_VM_CHECK]- (void)bindViewModel {
[V_VM_CHECK]    //@weakify(self);
[V_VM_CHECK]
[V_VM_CHECK]    // {@"code":@(0),@"msg":@""}
[V_VM_CHECK]    [self.viewModel.messageSubject subscribeNext:^(NSDictionary*  _Nullable x) {
[V_VM_CHECK]        //@strongify(self);
[V_VM_CHECK]        NSInteger code = [[x valueForKey:@"code"] integerValue];
[V_VM_CHECK]        NSString *msg = [x valueForKey:@"msg"];
[V_VM_CHECK]
[V_VM_CHECK]        switch(code) {
[V_VM_CHECK]            case 0: 
[V_VM_CHECK]            NSLog(@"%@",msg);
[V_VM_CHECK]            break;
[V_VM_CHECK]            default:
[V_VM_CHECK]                break;
[V_VM_CHECK]        }
[V_VM_CHECK]    }];
[V_VM_CHECK]
[V_VM_CHECK]    [[[self.viewModel.requestCommand executionSignals] switchToLatest] subscribeNext:^(NSNumber*  _Nullable x) {
[V_VM_CHECK]        //@strongify(self);
[V_VM_CHECK]    }];
[V_VM_CHECK]
[V_VM_CHECK]    [self.viewModel.requestCommand.errors subscribeNext:^(NSError * _Nullable x) {
[V_VM_CHECK]        //@strongify(self);
[V_VM_CHECK]    }];
[V_VM_CHECK]
[V_VM_CHECK]    // [self.viewModel.requestCommand execute:nil];
[V_VM_CHECK]
[V_VM_CHECK][V_VM_BIND]
[V_VM_CHECK][DOC_CHECK]    [self seg_networkSubNext];
[V_VM_CHECK]}

[V_VM_CHECK][DOC_CHECK]- (void)seg_networkSubNext {
[V_VM_CHECK][DOC_CHECK]    //@weakify(self);
[V_VM_CHECK][DOC_CHECK][DOC_RAC_SUB]
[V_VM_CHECK][DOC_CHECK]}

#pragma mark - getter
[V_PROPERTY_GET]
[V_VM_CHECK]-([V_VM_TYPE] *)viewModel{
[V_VM_CHECK]    if (!_viewModel) {
[V_VM_CHECK]        _viewModel = [[[V_VM_TYPE] alloc]init];
[V_VM_CHECK]    }
[V_VM_CHECK]    return _viewModel;
[V_VM_CHECK]}
#pragma mark setter
@end
''';

const String sl_container_UIViewController_h = '''
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/// [IN_DESC]
/// @date [DATE]
/// @author generate
@interface [IN_NAME] : UIViewController
@end

NS_ASSUME_NONNULL_END

/*
=================== Mediator ===================

/// [IN_DESC]
/// @date [DATE]
/// @author generate
-(UIViewController *)seg_init[IN_NAME]:(NSDictionary *)params;

/// [IN_DESC]
/// @date [DATE]
/// @author generate
-(UIViewController *)seg_init[IN_NAME]:(NSDictionary *)params {
    return [self performTarget:<#TargetName#> action:@"init[IN_NAME]" params:params shouldCacheTarget:NO];
}
*/

/*
=================== Mediator Impl ===================

#import "[IN_NAME].h"

/// [IN_DESC]
/// @date [DATE]
/// @author generate
- (UIViewController*)segAction_init[IN_NAME]:(NSDictionary*)params;

/// [IN_DESC]
/// @date [DATE]
/// @author generate
- (UIViewController*)segAction_init[IN_NAME]:(NSDictionary*)params {
    [IN_NAME] *VC = [[[IN_NAME] alloc]init];
    VC.hidesBottomBarWhenPushed = YES;

    if (params && [params isKindOfClass:[NSDictionary class]]) {
    	if ([[params allKeys]containsObject:@"title"]) {
    		VC.title = [params valueForKey:@"title"];
    	}
    }

    return VC;
}
*/
''';
const String sl_container_UIViewController_m = '''
#if __has_include(<SEGMasonry/SEGMasonry.h>)
#import <SEGMasonry/SEGMasonry.h>
#else
#import "SEGMasonry.h"
#endif

#import "[IN_NAME].h"
#import "[VC_V_TYPE].h"
[V_VM_CHECK]#import "[VC_VM_TYPE].h"

@interface [IN_NAME] ()
@property (nonatomic, strong) [VC_V_TYPE]* [VC_V_NAME];
[V_VM_CHECK]@property (nonatomic, strong) [VC_VM_TYPE]* [VC_VM_NAME];
@end

@implementation [IN_NAME]

#pragma mark - life cycle
- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = (self.title && self.title.length > 0) ? self.title : @"[IN_NAME]";
    self.automaticallyAdjustsScrollViewInsets = self.automaticallyAdjustsScrollViewInsets ? self.automaticallyAdjustsScrollViewInsets : NO;

    [self segInitViews];
    [self updateViewConstraints];
[V_VM_CHECK]    [self bindViewModel];
}

- (void)dealloc {
    NSLog(@"%s",__FUNCTION__);
}

#pragma mark - Init Views
-(void)segInitViews{
    self.view.backgroundColor = [UIColor whiteColor];

    [self.view addSubview:self.[VC_V_NAME]];
}

#pragma mark - Layout
- (void)updateViewConstraints {
    [self.[VC_V_NAME] seg_makeConstraints:^(SEGConstraintMaker *make) {
        make.left.equalTo(self.view);
        make.top.equalTo(self.view);
        make.right.equalTo(self.view);
        make.bottom.equalTo(self.view);
    }];
    
    [super updateViewConstraints];
}

//#pragma mark - public methods
//#pragma mark - private methods
//#pragma mark - [系统]Delegate
//#pragma mark - [自定义]Delegate
//#pragma mark - Event Response

[V_VM_CHECK]#pragma mark - RAC Data Binding
[V_VM_CHECK]- (void)bindViewModel {}

#pragma mark - getter
- ([VC_V_TYPE] *)[VC_V_NAME] {
    if (!_[VC_V_NAME]) {
        _[VC_V_NAME] = [[[VC_V_TYPE] alloc] [VC_V_INIT]];
    }
    return _[VC_V_NAME];
}

[V_VM_CHECK]-([VC_VM_TYPE] *)[VC_VM_NAME]{
[V_VM_CHECK]    if (!_[VC_VM_NAME]) {
[V_VM_CHECK]        _[VC_VM_NAME] = [[[VC_VM_TYPE] alloc]init];
[V_VM_CHECK]    }
[V_VM_CHECK]    return _[VC_VM_NAME];
[V_VM_CHECK]}
#pragma mark setter
@end
''';
const String sl_doc_mtd = '''
/// [DOCLEVER_M_DESC]
-(void)seg_[DOCLEVER_OBJC] {
    _[DOCLEVER_OBJC] = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id  _Nullable input) {
        return [RACSignal createSignal:^RACDisposable * _Nullable(id<RACSubscriber>  _Nonnull subscriber) {
            //@strongify(self);
            
            // Code here...
            [self.[DOCLEVER_M_OBJ] [DOCLEVER_MTD] {
                
                if (!isSuccessed) {
                    NSError *error = [NSError errorWithDomain:NSCocoaErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:errorMessage}];
                    [subscriber sendError:error];
                    return;
                }
                
                [subscriber sendNext:nil];
                [subscriber sendCompleted];
            }];
            
            return [RACDisposable disposableWithBlock:^{
            }];
        }];
    }];
}
''';

const String sl_kit_Class = '''
-([Class_TYPE] *)[Class_NAME] {
    if (!_[Class_NAME]) {
        _[Class_NAME] = [[[Class_TYPE] alloc] init];
    }
    return  _[Class_NAME];
}
''';
const String sl_kit_RACCommand = '''
-([RACCommand_TYPE] *)viewModel{
    if (!_viewModel) {
        _viewModel = [[[RACCommand_TYPE] alloc]init];
    }
    return _viewModel;
}''';
const String sl_kit_UIButton = '''
-(UIButton *)[UIButton_NAME] {
    if (!_[UIButton_NAME]) {
        _[UIButton_NAME] = [UIButton buttonWithType:UIButtonTypeCustom];
        _[UIButton_NAME].titleLabel.font = [UIFont systemFontOfSize:[UIButton_SIZE]];
        [_[UIButton_NAME] setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [_[UIButton_NAME] setBackgroundColor:[UIColor greenColor]];
        [_[UIButton_NAME] setTitle:@"[UIButton_TEXT]" forState:UIControlStateNormal];
        //[_[UIButton_NAME] setImage:[UIImage imageNamed:SEGPicName(@"")] forState:UIControlStateNormal];
        //[_[UIButton_NAME] setImage:[UIImage imageNamed:SEGPicName(@"")] forState:UIControlStateHighlighted];
        //_[UIButton_NAME].layer.cornerRadius = 2.0;
        //_[UIButton_NAME].layer.masksToBounds = YES;
        //_[UIButton_NAME].layer.borderWidth = 0.5;
        //_[UIButton_NAME].layer.borderColor = UIColor.seg_colorT.CGColor;
        //_[UIButton_NAME].backgroundColor = kSegRandomColor;
        //[_[UIButton_NAME] addTarget:self action:@selector([UIButton_NAME]Click:) forControlEvents:UIControlEventTouchUpInside];
    }
    return  _[UIButton_NAME];
}
//-(void)[UIButton_NAME]Click:(UIButton*)sender{
//    NSLog(@"%s",__func__);
//}
''';
const String sl_kit_UIImageView = '''
-(UIImageView *)[UIImageView_NAME] {
    if (!_[UIImageView_NAME]) {
        _[UIImageView_NAME] = [[UIImageView alloc]init];
        _[UIImageView_NAME].contentMode = UIViewContentModeScaleAspectFill;
        //_[UIImageView_NAME].image = [UIImage imageNamed:SEGPicName(@"")];
        //_[UIImageView_NAME].layer.masksToBounds = YES;
        //_[UIImageView_NAME].layer.cornerRadius = 0.5;
    }
    return _[UIImageView_NAME];
}

//NSString *urlString = [NSString stringWithFormat:@"%@%@",kClientImageRootURL,@""];
//UIImage *placeholderImage = [UIImage imageNamed:SEGPicName(@"")];
//[self.[UIImageView_NAME] setImageWithURL:[NSURL URLWithString:urlString] placeholderImage:placeholderImage];
''';
const String sl_kit_UILabel = '''
- (UILabel *)[UILabel_NAME] {
    if (!_[UILabel_NAME]) {
        _[UILabel_NAME] = [[UILabel alloc] init];
        _[UILabel_NAME].textColor = UIColor.seg_color1;
        _[UILabel_NAME].font = [UIFont systemFontOfSize:[UILabel_SIZE]];
        _[UILabel_NAME].text = @"[UILabel_TEXT]";
        _[UILabel_NAME].textAlignment = NSTextAlignmentLeft;
        _[UILabel_NAME].numberOfLines = 1;
        _[UILabel_NAME].lineBreakMode = NSLineBreakByTruncatingTail;
    }
    return _[UILabel_NAME];
};
''';
const String sl_kit_UIScrollView = '''
-(UIScrollView *)[UIScrollView_NAME] {
    if (!_[UIScrollView_NAME]) {
        _[UIScrollView_NAME] = [[UIScrollView alloc]init];
        _[UIScrollView_NAME].backgroundColor = [UIColor whiteColor];
        _[UIScrollView_NAME].contentSize = CGSizeMake(0, 0);
        _[UIScrollView_NAME].showsVerticalScrollIndicator = NO;
        _[UIScrollView_NAME].showsHorizontalScrollIndicator = NO;
    }
    return _[UIScrollView_NAME];
}
''';
const String sl_kit_UITableView = '''
- (UITableView *)[UITableView_NAME] {
    if (!_[UITableView_NAME]) {
        _[UITableView_NAME] = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
        _[UITableView_NAME].delegate = self;
        _[UITableView_NAME].dataSource = self;
        _[UITableView_NAME].backgroundColor = UIColor.clearColor;
        _[UITableView_NAME].showsVerticalScrollIndicator = NO;        
        _[UITableView_NAME].separatorStyle = UITableViewCellSeparatorStyleNone;
        _[UITableView_NAME].tableFooterView = [[UIView alloc] init];
[UITableView_CELL_GEGIS]
        if (@available(iOS 11, *)) {
            _[UITableView_NAME].contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
            _[UITableView_NAME].estimatedSectionHeaderHeight = 0;
            _[UITableView_NAME].estimatedSectionFooterHeight = 0;
        }        
    }
    return _[UITableView_NAME];
}
''';
const String sl_kit_UITextField = '''
-(UITextField *)[UITextField_NAME]{
    if (!_[UITextField_NAME]) {
        _[UITextField_NAME] = [[UITextField alloc]init];
        _[UITextField_NAME].backgroundColor = [UIColor clearColor];
        _[UITextField_NAME].userInteractionEnabled = YES;
        _[UITextField_NAME].font = [UIFont fontWithName:@"Heiti SC" size:[UITextField_SIZE]];
        _[UITextField_NAME].textColor = UIColor.seg_color1;
        _[UITextField_NAME].textAlignment = NSTextAlignmentRight;
        _[UITextField_NAME].contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
        _[UITextField_NAME].contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
        _[UITextField_NAME].returnKeyType = UIReturnKeyDone;
        _[UITextField_NAME].tintColor = UIColor.seg_colorT;
    }
    return _[UITextField_NAME];
}
''';
const String sl_kit_UIView = '''
-(UIView *)[UIView_NAME] {
    if (!_[UIView_NAME]){
        _[UIView_NAME] = [[UIView alloc]init];
        //_[UIView_NAME].backgroundColor = UIColor.seg_colorBG;
        //_[UIView_NAME].layer.cornerRadius = 2;
        //_[UIView_NAME].layer.masksToBounds = YES;
        //_[UIView_NAME].layer.borderColor = UIColor.seg_colorL2.CGColor;
        //_[UIView_NAME].layer.borderWidth = 0.5;
        //_[UIView_NAME].backgroundColor = kSegRandomColor;
    }
    return _[UIView_NAME];
}
''';
const String sl_mtd_RACCommand = '''
-(void)seg_[RACCommand_NAME]{
    //@weakify(self);
    _[RACCommand_NAME] = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id  _Nullable input) {
        return [RACSignal createSignal:^RACDisposable * _Nullable(id<RACSubscriber>  _Nonnull subscriber) {
            //@strongify(self);
            
            // Code here...
            // [subscriber sendNext:nil];
            // [subscriber sendCompleted];

            // NSError *error = [NSError errorWithDomain:NSCocoaErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:@"error!"}];
            // [subscriber sendError:error];            
            return [RACDisposable disposableWithBlock:^{
            }];
        }];
    }];
}''';

const String sl_mas = '''
    [self.[MAS_NAME] seg_makeConstraints:^(SEGConstraintMaker *make) {
        make.left.equalTo([MAS_SUPER]);
        make.top.equalTo([MAS_SUPER]);
        make.right.equalTo([MAS_SUPER]);
        make.bottom.equalTo([MAS_SUPER]);
    }];
''';
const String sl_table_cell = '''
#pragma mark - UITableViewDataSource
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.viewModel.[CELL_USE_NAME].count;;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    [CELL_USE]
    if (self.viewModel.[CELL_USE_NAME].count > indexPath.row) {
        cell.viewModel = self.viewModel.[CELL_USE_NAME][indexPath.row];
    }
    return  cell;
}

#pragma mark - UITableViewDelegate
- (CGFloat)tableView:(UITableView*)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath*)indexPath {
    return 44.f;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return UITableViewAutomaticDimension;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    
    if (self.viewModel.[CELL_USE_NAME].count > indexPath.row) {
        // [CELL_USE_VM] *data = self.viewModel.[CELL_USE_NAME][indexPath.row];
    }
}

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    UIView *view = [[UIView alloc] init];
    view.backgroundColor = UIColor.clearColor;
    return view;
}

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    UIView *view = [[UIView alloc] init];
    view.backgroundColor = UIColor.clearColor;
    return view;
}

-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 0.1;
}

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return 0.1;
}
''';
const String sl_vm_bind_UIButton = '''
    RACSignal * [UIButton_NAME]Signal = [self.[UIButton_NAME] rac_signalForControlEvents:UIControlEventTouchUpInside];
    // UITableViewCell中使用 rac_prepareForReuseSignal 方式
    // [UIButton_NAME]Signal = [[self.[UIButton_NAME] rac_signalForControlEvents:UIControlEventTouchUpInside] takeUntil:self.rac_prepareForReuseSignal];
    [[UIButton_NAME]Signal subscribeNext:^(__kindof UIControl * _Nullable x) {
        //@strongify(self);
        //[self.viewModel.[UIButton_CMD] execute:nil];
    }];
    
    [RACObserve(self.viewModel, [UIButton_String]) subscribeNext:^(id  _Nullable x) {
        //@strongify(self);
        //self.[UIButton_NAME].titleLabel.text = x;
        //[self.[UIButton_NAME] setTitle:x forState:UIControlStateNormal];
    }];
''';
const String sl_vm_bind_UILabel = '''
    RAC(self.[UILabel_NAME],text) = RACObserve(self.viewModel, [UILabel_String]);
    // UITableViewCell中使用下面
    // RAC(self.[UILabel_NAME],text) = [RACObserve(self.viewModel, [UILabel_String]) takeUntil:self.rac_prepareForReuseSignal]; 
''';
const String sl_vm_bind_UITextField = '''
    // TableViewCell 中注意双向绑定问题。
    RAC(self.viewModel,[UITextField_String]) = self.[UITextField_NAME].rac_textSignal;
''';
